using Microsoft.EntityFrameworkCore;
using MoMing.VideoTool.Downloader.Infrastructure.EntityConfigurations;
using MoMing.VideoTool.Downloader.Model;

namespace MoMing.VideoTool.Downloader.Infrastructure
{
    public class DonwloaderContext : DbContext
    {
        public DbSet<DownloadLog> DownloadLogs { get; set; }
        public DonwloaderContext(DbContextOptions<DonwloaderContext> options) : base(options) { }
        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.HasDefaultSchema("downloader");
            modelBuilder.ApplyConfiguration(new DownloadLogEntityTypeConfiguration());
        }
    }
}